Skip to content

Multi thread safe b#1393

Merged
Janther merged 4 commits intomainfrom
multi-thread-safe-b
Jan 30, 2026
Merged

Multi thread safe b#1393
Janther merged 4 commits intomainfrom
multi-thread-safe-b

Conversation

@Janther
Copy link
Copy Markdown
Member

@Janther Janther commented Jan 29, 2026

Same as #1392 but instead of piggybacking on the Prettier's options, we add our own collected metadata object.

// Old node constructor signature
constructor(ast: NonTerminalNode | TerminalNode, options?: PaserOptions)

// New node constructor signature
constructor(ast: NonTerminalNode | TerminalNode, collected: CollectedMetadata, options?: PaserOptions)

@Janther Janther requested a review from fvictorio January 29, 2026 03:55
Copy link
Copy Markdown
Member

@fvictorio fvictorio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like this option more. I only left a small comment.

I didn't review every single line here, but my understanding is that the three groups of changes are:

  • We pass the collectedMetadata in every constructor (that's what affects almost every changed line in this PR).
  • That is used instead of the global collections that were used before (only relevant in src/types.d.ts, slangSolidityParser.ts, and SlangNode.ts)
  • Some imports now use the .d.ts extension instead of .ts

Assuming that understanding is correct, LGTM.

Comment thread src/types.d.ts Outdated
@Janther Janther merged commit 999f6e4 into main Jan 30, 2026
7 checks passed
@Janther Janther deleted the multi-thread-safe-b branch January 30, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants